/*
 * Wazuh databaseFeedManager
 * Copyright (C) 2015, Wazuh Inc.
 * January 4, 2024.
 *
 * This program is free software; you can redistribute it
 * and/or modify it under the terms of the GNU General Public
 * License (version 2) as published by the FSF - Free Software
 * Foundation.
 */
#ifndef _TRAMPOLINE_OSDATACACHE_HPP
#define _TRAMPOLINE_OSDATACACHE_HPP

#include "MockOsDataCache.hpp"
#include "singleton.hpp"

#include "json.hpp"

extern std::shared_ptr<MockOsDataCache> spOsDataCacheMock;

/**
 * @brief This class is a wrapper of the trampoline content register library.
 */
class TrampolineOsDataCache final : public Singleton<TrampolineOsDataCache>
{
public:
    /**
     * @brief Constructor for creating a TrampolineOsDataCache object.
     *
     * The `TrampolineOsDataCache` constructor initializes a new instance of the
     * TrampolineOsDataCache class.
     */
    TrampolineOsDataCache() {};

    virtual ~TrampolineOsDataCache() = default;

    /**
     * @brief Trampoline to method getOsData.
     *
     * @param agentId
     *
     * @return Os
     */
    Os getOsData(const std::string& agentId)
    {
        return spOsDataCacheMock->getOsData(agentId);
    }

    /**
     * @brief Trampoline to method setOsData.
     *
     * @param agentId
     * @param osData
     */
    void setOsData(const std::string& agentId, const Os& osData)
    {
        spOsDataCacheMock->setOsData(agentId, osData);
    }
};

#endif //_TRAMPOLINE_OSDATACACHE_HPP
